package com.music.peacerhythms.active;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.music.peacerhythms.BuildConfig;
import com.music.peacerhythms.R;
import com.music.peacerhythms.databinding.ActivityAddconfigBinding;
import com.music.peacerhythms.databinding.ActivityPeacesettingBinding;

import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;


public class PeaceSettingActivity extends AppCompatActivity implements View.OnClickListener {
    ActivityPeacesettingBinding binding;

    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityPeacesettingBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        initAdapter();
    }

    private void initAdapter() {
        binding.versionname.setText("V" + BuildConfig.VERSION_NAME);
        iniOnclick();
    }


    private void iniOnclick() {
        binding.goback.setOnClickListener(this);
        binding.config.setOnClickListener(this);
        binding.aus.setOnClickListener(this);
        binding.pri.setOnClickListener(this);

    }


    @Override
    public void onClick(View v) {
        int id = v.getId();
        Intent intent;
        switch (id) {
            case R.id.goback:
                finish();
                break;
            case R.id.config:
                intent = new Intent(PeaceSettingActivity.this, ConfigListActivity.class);
                startActivity(intent);
                break;
            case R.id.aus:
                intent = new Intent(PeaceSettingActivity.this, WritingActivity.class);
                startActivity(intent);
                break;

                case R.id.pri:

                intent = new Intent(PeaceSettingActivity.this, WritingActivity.class);
                intent.putExtra("ispri",true);
                startActivity(intent);
                break;
        }
    }
}


